package com.chandra.pos.convertor;

/* @(#) Converter.java
 * Copyright 2013 - 2015 QatarAirways Group. All Rights Reserved.
 *
 * This Software is the proprietary information of QR Group
 * Use is subject to License terms.
 * Created by T4671 on 18/03/2015.
 */

/**
 * Converts to and from two different models.
 * Typically used between a domain &amp; business model.
 *
 * @param <T> Domain model bean.
 * @param <V> Business model (aka DTO).
 * @author David Winterfeldt
 */
public interface Converter<T, V> {

    /**
     * Converts from a domain model to the business model.
     */
    public V convertTo(T source);

    /**
     * Converts from a business model to the domain model.
     */
    public T convertFrom(V source);

}